package io.wins.vertx.entity;

import java.util.List;

import io.vertx.codegen.annotations.DataObject;
import io.vertx.core.json.JsonObject;
import io.wins.vertx.utils.UUIDUtils;
import org.apache.commons.lang3.StringUtils;

@DataObject(generateConverter = true)
public class Concert {
    public final String id;
    public String title;
    public String poster;
    public String shortDesc;
    public String place;
    public String content;
    public String seatType;
    public String seatMapId;
    public String seats;
    public String type;
    public String status;
    public float score;
    public String beginOn;
    public float minPrice;
    private List<ConcertTime> concertTime;
    private List<FaceValues> faceValues;
    private String tags;
    public long createdOn;
    public long updatedOn;

    public Concert(final JsonObject json) {
        ConcertConverter.fromJson(json, this);
        this.id = StringUtils.isEmpty(json.getString("id")) ?
            UUIDUtils.genId() : json.getString("id");
    }

    public JsonObject toJson() {
        final JsonObject json = new JsonObject();
        ConcertConverter.toJson(this, json);
        return json;
    }

    public String getId() {
        return this.id;
    }

    public String getTitle() {
        return this.title;
    }

    public void setTitle(final String title) {
        this.title = title;
    }

    public String getPoster() {
        return this.poster;
    }

    public void setPoster(final String poster) {
        this.poster = poster;
    }

    public String getShortDesc() {
        return this.shortDesc;
    }

    public void setShortDesc(final String shortDesc) {
        this.shortDesc = shortDesc;
    }

    public String getPlace() {
        return this.place;
    }

    public void setPlace(final String place) {
        this.place = place;
    }

    public String getContent() {
        return this.content;
    }

    public void setContent(final String content) {
        this.content = content;
    }

    public String getSeatType() {
        return this.seatType;
    }

    public void setSeatType(final String seatType) {
        this.seatType = seatType;
    }

    public String getSeatMapId() {
        return this.seatMapId;
    }

    public void setSeatMapId(final String seatMapId) {
        this.seatMapId = seatMapId;
    }

    public String getType() {
        return this.type;
    }

    public void setType(final String type) {
        this.type = type;
    }

    public String getStatus() {
        return this.status;
    }

    public void setStatus(final String status) {
        this.status = status;
    }

    public float getScore() {
        return this.score;
    }

    public void setScore(final float score) {
        this.score = score;
    }

    public String getBeginOn() {
        return this.beginOn;
    }

    public void setBeginOn(final String beginOn) {
        this.beginOn = beginOn;
    }

    public float getMinPrice() {
        return this.minPrice;
    }

    public void setMinPrice(final float minPrice) {
        this.minPrice = minPrice;
    }

    public String getTags() {
        return this.tags;
    }

    public void setTags(final String tags) {
        this.tags = tags;
    }

    public long getCreatedOn() {
        return this.createdOn;
    }

    public void setCreatedOn(final long createdOn) {
        this.createdOn = createdOn;
    }

    public long getUpdatedOn() {
        return this.updatedOn;
    }

    public void setUpdatedOn(final long updatedOn) {
        this.updatedOn = updatedOn;
    }

    public String getSeats() {
        return this.seats;
    }

    public void setSeats(final String seats) {
        this.seats = seats;
    }

    public List<ConcertTime> getConcertTime() {
        return this.concertTime;
    }

    public void setConcertTime(final List<ConcertTime> concertTime) {
        this.concertTime = concertTime;
    }

    public List<FaceValues> getFaceValues() {
        return this.faceValues;
    }

    public void setFaceValues(final List<FaceValues> faceValues) {
        this.faceValues = faceValues;
    }
}
